package com.longrise.co.ui.carfiles.contract;

import com.longrise.LEAP.Base.Objects.EntityBean;
import com.longrise.co.ui.carfiles.model.ComplaintBean;
import com.longrise.co.ui.carfiles.model.EvaluationBean;
import com.longrise.co.ui.carfiles.model.RepairRecord;
import com.longrise.co.ui.carfiles.model.RepairRecordDetail;
import com.longrise.co.ui.carfiles.model.UploadBean;
import com.ly.common.base.BaseModel;
import com.ly.common.base.BasePresenter;
import com.ly.common.base.BaseView;

import rx.Observable;

/**
 * Created by luoyang on 2017-6-22.
 */

public interface CarFilesContract {

     interface View<T> extends BaseView {
        void requestSuccess(T t);
         void onComplete();
    }

    interface ComplaintView<T> extends View<T> {
        void submitSuccess();
        void uploadPhotoSuccess(UploadBean bean);
    }



     interface Model extends BaseModel {
         Observable<RepairRecord> repairRecordRequest(EntityBean bean);
         //上传照片
         Observable<UploadBean> uploadPhotoRequest(EntityBean bean);
         //车辆投诉
         Observable<ComplaintBean> carComplaintRequest(EntityBean bean);
         //车辆评价
         Observable<EvaluationBean> carEvaluationRequest(EntityBean bean);
         //维修记录详情
         Observable<RepairRecordDetail> repairRecordDetailRequest(EntityBean bean);

    }

     abstract class Presenter extends BasePresenter<View , Model> {

         public abstract void getBindCarList(String carNo, boolean isShowProcess);

         public abstract void getRepairRecordList(String carNo, String vin, String pageNum, boolean isShowProcess);

         public abstract void getCompanyDetail(String companyId);
         //上传图片
         public abstract void uploadPhoto(String imageInfo, String type);
         //车辆投诉
         public abstract void carComplaint(String recordId, String year, String complaintDetails, String complaintImg);
         //车辆评价
         public abstract void carEvaluation(EntityBean bean);
         //维修记录详情
         public abstract void repairRecordDetailRequest(String recordId, String year, String carNo);

    }
}
